package com.wgworkshop.pems.repository;

import com.wgworkshop.pems.entity.WorkEntity;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * 作品库。
 * Created by wlc on 2017/8/31.
 */
@Repository
public interface WorkRepository extends PagingAndSortingRepository<WorkEntity, Long> {
    Iterable<WorkEntity> findByCourseDateBetweenAndStudentIdIn(Date start, Date end, List<Long> ids);

    Iterable<WorkEntity> findByStudentIdIn(List<Long> ids, Sort sort);
}
